import { createRouter, createWebHistory } from 'vue-router'

const router = createRouter({
  history: createWebHistory(import.meta.env.BASE_URL),
  routes: [
    {
      path:'/',
      redirect:'/login',
    },
    {
      path:'/dashboard',
      name:'dashboard',
      component:()=>import('../views/DashboardView.vue'),
      children:[
        {
          path:'welcome',
          name:'welcome',
          component:()=>import('../views/dashboard/WelcomeView.vue')
        },
        {
          path:'user',
          name:'user',
          component:()=>import('../views/dashboard/user/UserView.vue'),
          children:[
            {
              path:'index',
              component:()=>import('../views/dashboard/user/IndexView.vue')
            }
          ]
        },
        {
          path:'film',
          name:'film',
          component:()=>import('../views/dashboard/film/FilmView.vue'),
          children:[
            {
              path:'index',
              component:()=>import('../views/dashboard/film/IndexView.vue')
            }
          ]
        },
        {
          path:'cinema',
          name:'cinema',
          component:()=>import('../views/dashboard/cinema/CinemaView.vue'),
          children:[
            {
              path:'index',
              component:()=>import('../views/dashboard/cinema/IndexView.vue')
            }
          ]
        },
        {
          path:'college',
          name:'college',
          component:()=>import('../views/dashboard/college/CollegeView.vue'),
          children:[
            {
              path:'index',
              component:()=>import('../views/dashboard/college/IndexView.vue')
            }
          ]
        }
      ]
    },
    {
      path:'/login',
      name:'login',
      component:()=>import('../views/LoginView.vue')
    }
  ]
})

export default router
